<?php

include_once("multi_language.php");
//function translate($s) { return $s; }

?>
<html>
<head>
<title>
<?=translate('res_cp');?>
</title>
<!--<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">-->
<meta http-equiv="Content-Type" content="text/html; charset=<?=translate('encoding');?>">
<link rel="stylesheet" href="styles_new.css" type="text/css">

<?php if (!empty($xajax)) { $xajax->printJavascript('xajax/');} // output the xajax javascript. This must be called between the head tags ?>

<script>
        function show_help(file){

        var sFeatures = ""+
                " channelmode = no,"+
                " directories = no,"+
                " fullscreen = no,"+
                " height = 430"+
                " left = "+((screen.width/2)-250)+","+
                " location = no,"+
                " menubar = no,"+
                " resizable = no,"+
                " scrollbars = yes,"+
                " status = no,"+
                " titlebar = no,"+
                " toolbar = no,"+
                " top = "+((screen.height/2)-250)+","+
                " width =  570";




        if (file){
                 win_pop =  window.open(file,"", sFeatures,"");
        }
}
var agt = navigator.userAgent.toLowerCase();
var apName = navigator.appName.toLowerCase();
var is_nav4 = ((apName == "netscape") && (parseInt(navigator.appVersion) < 5))? 1:0;
var is_ie4 = ((apName == "msie") && (parseInt(navigator.appVersion) < 5))? 1:0;
var is_dom = document.getElementById? 1:0;
var is_gecko = (agt.indexOf('gecko') != -1)? 1:0;
var is_ie = (agt.indexOf("msie") != -1)? 1:0;
var is_nav = (agt.indexOf('mozilla')!=-1) && (agt.indexOf('opera')==-1)? 1:0;
var is_ie5up = (is_dom && is_ie)? 1:0;
var is_nav6up = (is_dom && (is_gecko || is_nav))? 1:0;

var docObj = is_nav4? "document.": is_ie4? "document.all.": is_dom? "document.getElementById('": 0;
var styleObj = is_nav4? "": is_ie4? "": is_dom? "')":0;

var current_popup_id = '';
var pupup_timer_id = '';

//----------------------------------------------
function on_eo(event,id,status){
		if(current_popup_id && current_popup_id!=id){
			var el = eval(docObj + current_popup_id + styleObj);
			el.style.display = 'none';
		}
		var el = eval(docObj + id + styleObj);
		if(status == 'show'){
			if(current_popup_id==id) return;
			if (is_dom && window.event) {
				leftVal = window.event.clientX + 20 + document.documentElement.scrollLeft + document.body.scrollLeft;
				topVal = window.event.clientY + 10 + document.documentElement.scrollTop + document.body.scrollTop;
			} else if (is_ie4) {
				topVal = eval(event.y + 10 + document.body.scrollTop);
				leftVal = eval(event.x+ 20 );
			} else if (is_nav4) {
				topVal = eval(event.pageY + 10);
				leftVal = eval(event.pageX + 20);
			} else {
				leftVal = event.clientX + 20 + window.scrollX;
				topVal = event.clientY + 10 + window.scrollY;
			}
			if (leftVal < 2) { leftVal = 2; }
			el.style.left = leftVal;
			el.style.top = topVal;
			el.style.display = 'block';
			current_popup_id = id;
			//el.style.zIndex = 100;
			window.clearTimeout(pupup_timer_id);
			return;
		}
		if(status == 'pause'){
			window.clearTimeout(pupup_timer_id);
			return;
		}
		if(status == 'fade_hide'){
			pupup_timer_id = window.setTimeout("on_eo('','"+id+"','hide')",500);
			return;
		}
		if(status == 'hide'){
			el.style.display = 'none';
			current_popup_id = '';
			return;
		}
}

function show_hide(id)
{
	var tmp;
	eval("tmp = document.getElementById('"+id+"').style.display");
	if(tmp == 'none')
	{
		eval("document.getElementById('"+id+"').style.display = 'block'");
		document.cookie = id + "=" + escape('block') + "; path=/";
	}else{
		eval("document.getElementById('"+id+"').style.display = 'none'");
		document.cookie = id + "=" + escape('none') + "; path=/";
	}
}

</script>
</head>
<body>
<?
if($_SERVER['REMOTE_ADDR']=='213.222.51.230' ||
   $_SERVER['REMOTE_ADDR']=='213.222.51.227' ||
   $_SERVER['REMOTE_ADDR']=='213.222.51.231' ||
   $_SERVER['REMOTE_ADDR']=='213.222.51.246'){

?>
<div id='totals' style='background-color:#F5F4EF;position:absolute;display:none;' onMouseOver="on_eo(event,this.id,'pause');" onMouseOut="on_eo(event,this.id,'fade_hide')">
  <? include("commision_totals.html"); ?>
</div>
<?}?>
<table width="789" height="100%"  border="0" cellspacing="0" cellpadding="0" align="center" background="images/bg_new.jpg">
  <tr>
    <td valign="top"><table width="780"  border="0" cellspacing="0" cellpadding="0" align="center">
        <tr>
          <td height="52"><table width="100%"  border="0" cellspacing="0" cellpadding="0" background="images/bg_logo.gif">
              <tr>
                <td width="204"><img src="images/logo_t.jpg" width="204" height="52"></td>
                <td align="right" style="padding-right: 14px;"><table border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="14"><img src="images/vstore_ico.gif" width="10" height="9"></td>
                      <td style="padding-right: 30px;"><a target='_blank' href='<? echo "http://www.$domainname/?r=$userName"; ?>'  > <strong>
                        <?=translate('visit_store');?>
                      </strong> </a></td>
                      <td width="14"><img src="images/logout_ico.gif" width="10" height="9"></td>
                      <td><?
					$params[sid] = $sid;
					$params[action] = 'logout';
					$url = "$baseURL/?".encode_params($params);
					?>
                        <a href='<?=$url;?>' ><strong>
                        <?=translate('logout');?>
                      </strong></a></td>
                    </tr>
                  </table>
				  <table border="0" cellspacing="0" cellpadding="0" align="right">
              <tr>
                <?
if($_SERVER['REMOTE_ADDR']=='213.222.51.230' ||
   $_SERVER['REMOTE_ADDR']=='213.222.51.227' ||
   $_SERVER['REMOTE_ADDR']=='213.222.51.246' ||
   $_SERVER['REMOTE_ADDR']=='83.288.120.74'){

?>
                <td height="20" align="right" valign="middle"><font style="font-family: Arial, Helvetica, sans-serif; font-size: 8pt; color: #000000; text-decoration: none"
onMouseOver="this.style.textDecoration='underline';on_eo(event,'totals','show')"
onMouseOut="this.style.textDecoration='none';on_eo(event,'totals','fade_hide')"> Commision: <? echo $totals[total];?> </font> </td>
                <? } ?>
                <td height="20" align="right" valign="middle" class="nav"><? include('wall_top.html'); ?></td>
              </tr>
            </table>
			    </td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td background="images/bg_nav.jpg" height="29"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="204"><img src="images/logo_b.jpg" width="204" height="29"></td>
                <td width="51" align="center">
<?
                        $params[sid] = $sid;
                        $params[action] = 'mainPanel';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
			<a href='<?=$url;?>' title="Home" class="nav">
                <strong>
                  <?=translate('home');?>
                  </strong></a></td>
                <td width="3"><img src="images/nav_line.jpg" width="3" height="29"></td>
                <td width="89" align="center">
				<?
                       unset($params);
                        $params[sid] = $sid;
                        $params[action] = 'tickets';
                        $params[option] = 'reseller_support';
                        $params[currentTab] = 4;
                        $url = "$baseURL/$webDIR/?".encode_params($params);
                        ?>
				<a href="<?=$url?>" class="nav"><strong>
                  <?=translate('contact_us');?>
                  </strong></a></td>
                <td width="3"><img src="images/nav_line.jpg" width="3" height="29"></td>
                <td width="44" align="center"><a href="http://www.resellerspanel.com/support/resellers_FAQ.html" target="_blank" class="nav"><strong>
                  <?=translate('faq');?>
                  </strong></a></td>
                <td width="3"><img src="images/nav_line.jpg" width="3" height="29"></td>
		  <form action='http://supremecenter.com/members/login.php' name='demoaccount' method='POST' target='_blank'>
	          <input type='hidden' name='username' value='demoacc'>
        	  <input type='hidden' name='password' value='demo'>
        	  </form>
                <td width="104" align="center">
		  <a href="javascript: document.demoaccount.submit()" onMouseOver="window.status=''; return true" class="nav">
		  <strong><?=translate('hosting_demo');?></strong>
		  </a>
		</td>
                <td width="3"><img src="images/nav_line.jpg" width="3" height="29"></td>
                <td align="right" style="padding-right: 14px;"><table border="0" cellspacing="0" cellpadding="0" background="images/bg_flag.jpg">
                    <tr valign="bottom">
					  <td><img src="images/l_flag.jpg"></td>
					  <td width="6">&nbsp;</td>
                      <td><?
			$params[sid] = $sid;
			$params[action] = 'change_lang';
			$params[language] = 'en';
			//$params[url] = "$baseURL".$_SERVER[REQUEST_URI];
			$params[laction] = $action;
			$url = "$baseURL/?".encode_params($params);
		?>
                        <a href="<?=$url;?>"><img src="images/en.jpg" width="20" height="14" border="0"></a> </td>
                      <td width="6">&nbsp;</td>
                      <td><?
			$params[sid] = $sid;
			$params[action] = 'change_lang';
			$params[language] = 'es';
			//$params[url] = "$baseURL".$_SERVER[REQUEST_URI];
			$params[laction] = $action;
			$url = "$baseURL/?".encode_params($params);
		?>
                        <a href="<?=$url;?>"><img src="images/sp.jpg" width="20" height="14" border="0"></a> </td>
                      <?
  $username = $_SESSION['username'];
  if ($username == "ice22" || $username == "registertesting") {
       ?>
                      <td width="6">&nbsp;</td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'change_lang';
                        $params[language] = 'jp';
                        //$params[url] = "$baseURL".$_SERVER[REQUEST_URI];
                        $url = "$baseURL/?".encode_params($params);
                ?>
                        <a href="<?=$url;?>"><img src="images/jp.jpg" width="20" height="14" border="0"></a> </td>
                      <?
  }
  if ($username =="cbfl") {
?>
                      <td width="6">&nbsp;</td>
                      <td><?
			$params[sid] = $sid;
			$params[action] = 'change_lang';
			$params[language] = 'de';
			//$params[url] = "$baseURL".$_SERVER[REQUEST_URI];
			$url = "$baseURL/?".encode_params($params);
		?>
                        <a href="<?=$url;?>"><img src="images/ge.jpg" width="20" height="14" border="0"></a> </td>
                      <td width="6">&nbsp;</td>
                      <td><?
			$params[sid] = $sid;
			$params[action] = 'change_lang';
			$params[language] = 'fr';
			//$params[url] = "$baseURL".$_SERVER[REQUEST_URI];
			$url = "$baseURL/?".encode_params($params);
		?>
                        <a href="<?=$url;?>"><img src="images/fr.jpg" width="20" height="14" border="0"></a> </td>
                      <td width="6">&nbsp;</td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'change_lang';
                        $params[language] = 'ru';
                        //$params[url] = "$baseURL".$_SERVER[REQUEST_URI];
                        $url = "$baseURL/?".encode_params($params);
                ?>
                        <a href="<?=$url;?>"><img src="images/ru.jpg" width="20" height="14" border="0"></a> </td>
                      <? } ?>
                      <td width="6">&nbsp;</td>
                      <td><?
			$params[sid] = $sid;
			$params[action] = 'change_lang';
			$params[language] = 'pt';
			//$params[url] = "$baseURL".$_SERVER[REQUEST_URI];
			$params[laction] = $action;
			$url = "$baseURL/?".encode_params($params);
		?>
                        <a href="<?=$url;?>"><img src="images/pt.jpg" width="20" height="14" border="0"></a> </td>
                      <td width="6">&nbsp;</td>
                      <td><?
			$params[sid] = $sid;
			$params[action] = 'change_lang';
			$params[language] = 'bg';
			//$params[url] = "$baseURL".$_SERVER[REQUEST_URI];
			$params[laction] = $action;
			$url = "$baseURL/?".encode_params($params);
		?>
                        <a href="<?=$url;?>"><img src="images/bg.jpg" width="20" height="14" border="0"></a> </td>
                      <?
              if ($rpType == 'ninja') {
              ?>
                      <td width="6">&nbsp;</td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'change_lang';
                        $params[language] = 'jp';
                        //$params[url] = "$baseURL".$_SERVER[REQUEST_URI];
                        $params[laction] = $action;
                        $url = "$baseURL/?".encode_params($params);
                ?>
                        <a href="<?=$url;?>"><img src="images/jp.jpg" width="20" height="14" border="0"></a> </td>
                      <?
            }
            ?>
					<td width="6">&nbsp;</td>
					<td><img src="images/r_flag.jpg"></td>
                    </tr>
				</table></td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="5">
              <tr>
                <td valign="top" width="170" style="padding-left: 14px;"><div onClick="show_hide('product_settings')" class="lnav_head">
                    <?=translate('product_settings');?>
                  </div>
                  <span id="product_settings" name="product_settings" style="display:<?=$_COOKIE['product_settings'];?>">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'createPlan';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('create_new_plans');?>">
                        <?=translate('create_new_plans');?>
                        </a> <sup><span style="color: red; font-weight: bold;">NEW</span></sup></td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'managePlans';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('products_offer_title');?>" >
                        <?=translate('products_offer');?>
                        </a> </td>
                    </tr>
                    <!--<tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        #$params[sid] = $sid;
                        #$params[action] = 'managePlans2';
                        #$url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('products_offer_title');?>" >
                        <?=translate('products_offer2');?>
                        </a> </td>
                    </tr>-->
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editPlans';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('edit_prices_title');?>">
                        <?=translate('edit_prices');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editServicePrices';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('edit_upgrade_title');?>" >
                        <?=translate('edit_upgrade');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
						$params[sid] = $sid;
						$params[action] = 'editClientsUpgrades';
						$url = "$baseURL/?".encode_params($params);
						?>
                        <a href='<?=$url;?>' title="<?=translate('upgrades');?>" >
                        <?=translate('upgrades');?>
                      </td>
                    </tr>
                    <tr>
                        <td width="17"><img src="images/lnav_dot.gif"></td>
                        <td><?
                         $params[sid] = $sid;
                         $params[action] = 'moveClient2Plan';
                         $url = "$baseURL/?".encode_params($params);
                         ?>
                         <a href='<?=$url;?>' title="<?=translate('change_clients_plan');?>">
                         <?=translate('change_clients_plan');?>
                         </a> <sup><span style="color: red; font-weight: bold;">NEW</span></sup></td>
                    </tr>
                    <tr>
                        <td width="17"><img src="images/lnav_dot.gif"></td>
                        <td><?
                         $params[sid] = $sid;
                         $params[action] = 'planStats';
                         $url = "$baseURL/?".encode_params($params);
                         ?>
                         <a href='<?=$url;?>' title="<?=translate('plan_statistics');?>">
                         <?=translate('plan_statistics');?>
                         </a> <sup><span style="color: red; font-weight: bold;">NEW</span></sup></td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params['sid'] = $sid;
                        $params['action'] = 'manageEmailNotifications';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="E-mail Notifications">
                        E-mail Notifications
                        </a></td>
                    </tr>
                  </table>
                  </span><br style="line-height: 3px;">
                  <div onClick="show_hide('api_details')" class="lnav_head">
                    <?=translate('api_details')?>
                  </div>
                  <span id="api_details" name="api_details" style="display:<?=$_COOKIE['api_details'];?>">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editApiSettings';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('change_api_settings');?>" >
                        <?=translate('change_api_settings');?>
                      </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'downloadApiDemo';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('download_api_demo');?>" >
                        <?=translate('download_api_demo');?>
                      </td>
                    </tr>
                  </table>
                  </span><br style="line-height: 3px;">
                  <div onClick="show_hide('wallet_details')" class="lnav_head">
                    <?=translate('wallet_details')?>
                  </div>
                  <span id="wallet_details" name="wallet_details" style="display:<?=$_COOKIE['wallet_details'];?>">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'walletAccountRefill';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('wallet_account_refill');?>" >
                        <?=translate('wallet_account_refill');?>
                      </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'walletPaymentHistory';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('wallet_payment_history');?>" >
                        <?=translate('wallet_payment_history');?>
                      </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'walletSettings';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('wallet_settings');?>" >
                        <?=translate('wallet_settings');?>
                      </td>
                    </tr>
                  </table>
                  </span><br style="line-height: 3px;">
                  <div onClick="show_hide('misc_orders')" class="lnav_head">
                    <?=translate('misc_orders')?>
                  </div>
                  <span id="misc_orders" name="misc_orders" style="display:<?=$_COOKIE['misc_orders'];?>">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'order';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('manual_order_title');?>" >
                        <?=translate('manual_order');?>
                        </a> </td>
                      <!-- <?
						$params[sid] = $sid;
									$params[action] = 'order_wp';
						echo "$baseURL/?".encode_params($params);
					 ?> -->
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'manualUpgrades';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('manual_upgrades');?>" >
                        <?=translate('manual_upgrades');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
						$params[action] = 'editRemoteFormsOrder';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('direct_order_title');?>">
                        <?=translate('direct_order');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
						$params[action] = 'editRemoteFormsDomain';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="">
                        <?=translate('domain_search');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
						$params[action] = 'editRemoteTemplate';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="">
                        <?=translate('remote_templates');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'remote_login';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="">
                        <?=translate('custom_login');?>
                        </a> </td>
                    </tr>
                  </table>
                  </span><br style="line-height: 3px;">
                  <? /* ?>
                  <div onClick="show_hide('domains')" class="lnav_head">
                    <?=translate('domains')?>
                  </div>
                  <span id="domains" name="domains" style="display:<?=$_COOKIE['domains'];?>">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <?
                        	$params[sid] = $sid;
                       		$params[action] = 'check_domain_availability';
                        	$url = "$baseURL/?".encode_params($params);
                        	?>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><a href='<?=$url;?>' title="<?=translate('check_availability');?>">
                        <?=translate('check_availability');?>
                        </a></td>
                    </tr>
                    <tr>
                      <?
                        	$params[sid] = $sid;
                       		$params[action] = 'register_domain';
                        	$url = "$baseURL/?".encode_params($params);
                        	?>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><a href='<?=$url;?>' title="<?=translate('register_domain');?>">
                        <?=translate('register_domain');?>
                        </a></td>
                    </tr>
                    <tr>
                      <?
                        	$params[sid] = $sid;
                       		$params[action] = 'changedetails';
                        	$url = "$baseURL/?".encode_params($params);
                        	?>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><a href='<?=$url;?>' title="<?=translate('change_domain_details');?>">
                        <?=translate('change_domain_details');?>
                        </a></td>
                    </tr>
                    <tr>
                      <?
                        	$params[sid] = $sid;
                       		$params[action] = 'domain_renew';
                        	$url = "$baseURL/?".encode_params($params);
                        	?>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><a href='<?=$url;?>' title="<?=translate('domain_renew');?>">
                        <?=translate('domain_renew');?>
                        </a></td>
                    </tr>
                  </table>
                  </span><br style="line-height: 3px;">
                  <? */ ?>
                  <div onClick="show_hide('stats_and_reports')" class="lnav_head">
                    <?=translate('stats_and_reports')?>
                  </div>
                  <span id="stats_and_reports" name="stats_and_reports" style="display:<?=$_COOKIE['stats_and_reports'];?>">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">

<?
//if ((preg_match('/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/', $_SERVER['REMOTE_ADDR'], $regs) && $regs[1] == '88' && $regs[2] == '203' && $regs[3] == '210')) {
?>
                                        <tr>
                                          <td width="17"><img src="images/lnav_dot.gif"></td>
                                          <td><?
                                                                        $params[sid] = $sid;
                                                                        $params[action] = 'accountingManager';
                                                                        $url = "$baseURL/?".encode_params($params);
                                                        ?>
                                                        <a href='<?=$url;?>' title="Invoice Manager">
                                                        Invoice Manager
                                                        </a> <sup><span style="color: red; font-weight: bold;">NEW</span></sup></td>
                                        </tr>

<?
//}
?>
					<tr>
					  <td width="17"><img src="images/lnav_dot.gif"></td>
					  <td><?
							$params[sid] = $sid;
							$params[action] = 'stats_general';
							$url = "$baseURL/?".encode_params($params);
						?>
						<a href='<?=$url;?>' target=_blank title="General Stats" >
						General Stats
						</a> </td>
					</tr>

					<tr>
					  <td width="17"><img src="images/lnav_dot.gif"></td>
					  <td><?
							$params[sid] = $sid;
							$params[action] = 'stats_domains';
							$url = "$baseURL/?".encode_params($params);
						?>
						<a href='<?=$url;?>' target=_blank title="Domains Stats" >
						Domain Stats
						</a> </td>
					</tr>
                                        <tr>
                                          <td width="17"><img src="images/lnav_dot.gif"></td>
                                          <td><?
                                                        $params[sid] = $sid;
                                                        $params[action] = 'stats_affiliates';
                                                        $url = "$baseURL/?".encode_params($params);
                                                ?>
                                                <a href='<?=$url;?>' target=_blank title="Affiliates' Stats" >
                                                Affiliate Stats
                                                </a> </td>
                                        </tr>

                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'payments';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('view_payments_title');?>" >
                        <?=translate('view_payments');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'viewClients';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('view_clients_title');?>" >
                        <?=translate('view_clients');?>
                        </a> </td>
                    </tr>
                    <?if($userName=='mathd'){?>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'viewSales';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('sales_and_renew_title');?>" >
                        <?=translate('sales_and_renew');?>
                        </a> </td>
                    </tr>
                    <?}?>
                    <? if($id==975){ ?>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = "clients_details";
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('view_clients_title');?>" >
                        <?=translate('view_clients');?>
                        </a> </td>
                    </tr>
                    <? } ?>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'viewAffiliates';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('view_affiliates_title');?>" >
                        <?=translate('view_affiliates');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'stats';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('traffic_stats_title');?>" >
                        <?=translate('traffic_stats');?>
                        </a> </td>
                    </tr>
                  </table>
                  </span><br style="line-height: 3px;">
                  <div onClick="show_hide('web_interface_set')" class="lnav_head">
                    <?=translate('web_interface_set')?>
                  </div>
                  <span id="web_interface_set" name="web_interface_set" style="display:<?=$_COOKIE['web_interface_set'];?>">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editStoreName';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('store_name_title');?>" >
                        <?=translate('store_name');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editTemplate';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('template_title');?>" >
                        <?=translate('template');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editMeta';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('edit_metatags_title');?>" >
                        <?=translate('edit_metatags');?>
                        </a>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editDescription';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('sort_features_title');?>" >
                        <?=translate('sort_features');?>
                        </a> </td>
                    </tr>
                    <!--
							<tr>
									<td>
											<?
											$params[sid] = $sid;
											$params[action] = 'editStyle';
											$url = "$baseURL/?".encode_params($params);
											?>
											<a href='<?=$url;?>' >Edit Style</a>
									</td>
							</tr>
					-->
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editHeader';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('edit_header_title');?>" >
                        <?=translate('edit_header');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editFooter';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('edit_footer_title');?>" >
                        <?=translate('edit_footer');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editMenu';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('edit_links_title');?>" >
                        <?=translate('edit_links');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editContacts';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="" >
                        <?=translate('edit_contacts');?>
                        </a> </td>
                    </tr>
                    <?php
                    		// Show Edit About Us menu only for resellers using 15-th template
                    		$resellerTemplateSettings = get_interface_settings($id);
												if ($resellerTemplateSettings['template'] == 15) {
                    ?>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params['sid'] = $sid;
                        $params['action'] = 'editAboutUs';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="" >
                        <?=translate('edit_aboutus');?>
                        </a> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params['sid'] = $sid;
                        $params['action'] = 'editTakeaTour';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="" >
                        Edit Take a Tour
                        </a><sup><span style="color: red; font-weight: bold;">NEW</span></sup> </td>
                    </tr>
                    <?php } ?>
                  </table>
                  </span><br style="line-height: 3px;">
                  <div onClick="show_hide('site_manager')" class="lnav_head">
                    <?=translate('site_manager')?>
                  </div>
                  <span id="site_manager" name="site_manager" style="display:<?=$_COOKIE['site_manager'];?>">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
<?
/*
?>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td height="2"><?
                        $params[sid] = $sid;
                        $params[action] = 'add_domain';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('domain_manager_title');?>" >
                        <?=translate('domain_manager');?>
                        </a> </td>
                    </tr>
<?
*/
?>
<?
//if ((preg_match('/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/', $_SERVER['REMOTE_ADDR'], $regs) && $regs[1] == '88' && $regs[2] == '203' && $regs[3] == '210') || in_array($_SERVER['REMOTE_ADDR'], array('88.203.210.112', '88.203.210.53', '88.203.210.94'))) {
?>
                                        <tr>
                                          <td width="17"><img src="images/lnav_dot.gif"></td>
                                          <td><?
                                                        $params[sid] = $sid;
                                                        $params[action] = 'manageDomains';
                                                        $url = "$baseURL/?".encode_params($params);
                                                ?>
                                                <a href='<?=$url;?>' title="Domain Manager">
                                                Domain Manager
                                                </a> <sup><span style="color: red; font-weight: bold;">NEW</span></sup></td>
                                        </tr>

<?
//}
?>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'emails';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('email_manager_title');?>" >
                        <?=translate('email_manager');?>
                        </a> </td>
                    </tr>
					<tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'news';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('news_manager_title');?>" >
                        <?=translate('news_manager');?>
                        </a> <sup><span style="color: red; font-weight: bold;">NEW</span></sup></td>
                    </tr>
                  </table>
                  </span><br style="line-height: 3px;">
                  <div onClick="show_hide('reseller_details')" class="lnav_head">
                    <?=translate('reseller_details')?>
                  </div>
                  <span id="reseller_details" name="reseller_details" style="display:<?=$_COOKIE['reseller_details'];?>">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'changeDetails';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('change_details_title');?>" >
                        <?=translate('change_details');?>
                      </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'changeBankDetails';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="<?=translate('change_payment_title');?>" >
                        <?=translate('change_payment');?>
                        </a> </td>
                    </tr>
                    <?if($resellerCountry=='US'){?>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
                        $params[sid] = $sid;
                        $params[action] = 'editW9Form';
                        $url = "$baseURL/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="" >
                        <?=translate('submit_w9');?>
                        </a> </td>
                    </tr>
                    <?}?>
                  </table>
                  </span><br style="line-height: 3px;">
                  <div onClick="show_hide('support_tickets')" class="lnav_head">
                    <?=translate('support_tickets');?>
                  </div>
                  <span id="support_tickets" name="support_tickets" style="display:<?=$_COOKIE['support_tickets'];?>">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
	   					unset($params);
                        $params[sid] = $sid;
                        $params[action] = 'tickets';
                        $params[option] = 'client_support';
                        $url = "$baseURL/$webDIR/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="" >
                        <?=translate('client_support');?>
                        </a><sup><span style="color: red; font-weight: bold;">NEW</span></sup> </td>
                    </tr>
                    <tr>
                      <td width="17"><img src="images/lnav_dot.gif"></td>
                      <td><?
	   					unset($params);
                        $params[sid] = $sid;
                        $params[action] = 'tickets';
                        $params[option] = 'reseller_support';
                        $url = "$baseURL/$webDIR/?".encode_params($params);
                        ?>
                        <a href='<?=$url;?>' title="" >
                        <?=translate('reseller_support');?>
                        </a><sup><span style="color: red; font-weight: bold;">NEW</span></sup> </td>
                    </tr>
                  </table>
                  </span><br style="line-height: 3px;">
                </td>
                <td align="center" valign="top" width="75%" style="padding: 10px;"><? include($fileTemplate); ?>
                </td>
              </tr>
            </table></td>
        </tr>
        </table></td>
  </tr>
  <tr>
  	<td><table width="780" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr>
                <td align="center"><a href="http://www.resellerspanel.com/terms/" target="_blank">
                  <?=translate('terms_and_conditions');?>
                  </a> | <a href="http://www.resellerspanel.com/terms/privacy_policy.html" target="_blank">
                  <?=translate('privacy_policy');?>
                  </a></td>
              </tr>
              <tr>
                <td align="center" height="20"><?=translate('rp_copyright');?></td>
              </tr>
            </table></td>
  </tr>
</table>
